#include <cstdio>

int main( )
{
    int n, c;
    while ( scanf("%d", &n) && n )
    {
        c = 0;
        while ( n != 1 )
        {
            if ( n & 1 )
                n = ( 3 * n + 1 ) / 2;
            else
                n /= 2;
            c++;
        }
        printf("%d\n", c);
    }
    return 0;
}
